package com.wct.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class DepartmentExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DepartmentExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andDIdIsNull() {
            addCriterion("d_id is null");
            return (Criteria) this;
        }

        public Criteria andDIdIsNotNull() {
            addCriterion("d_id is not null");
            return (Criteria) this;
        }

        public Criteria andDIdEqualTo(Integer value) {
            addCriterion("d_id =", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdNotEqualTo(Integer value) {
            addCriterion("d_id <>", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdGreaterThan(Integer value) {
            addCriterion("d_id >", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("d_id >=", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdLessThan(Integer value) {
            addCriterion("d_id <", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdLessThanOrEqualTo(Integer value) {
            addCriterion("d_id <=", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdIn(List<Integer> values) {
            addCriterion("d_id in", values, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdNotIn(List<Integer> values) {
            addCriterion("d_id not in", values, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdBetween(Integer value1, Integer value2) {
            addCriterion("d_id between", value1, value2, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdNotBetween(Integer value1, Integer value2) {
            addCriterion("d_id not between", value1, value2, "dId");
            return (Criteria) this;
        }

        public Criteria andDNameIsNull() {
            addCriterion("d_name is null");
            return (Criteria) this;
        }

        public Criteria andDNameIsNotNull() {
            addCriterion("d_name is not null");
            return (Criteria) this;
        }

        public Criteria andDNameEqualTo(String value) {
            addCriterion("d_name =", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameNotEqualTo(String value) {
            addCriterion("d_name <>", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameGreaterThan(String value) {
            addCriterion("d_name >", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameGreaterThanOrEqualTo(String value) {
            addCriterion("d_name >=", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameLessThan(String value) {
            addCriterion("d_name <", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameLessThanOrEqualTo(String value) {
            addCriterion("d_name <=", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameLike(String value) {
            addCriterion("d_name like", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameNotLike(String value) {
            addCriterion("d_name not like", value, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameIn(List<String> values) {
            addCriterion("d_name in", values, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameNotIn(List<String> values) {
            addCriterion("d_name not in", values, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameBetween(String value1, String value2) {
            addCriterion("d_name between", value1, value2, "dName");
            return (Criteria) this;
        }

        public Criteria andDNameNotBetween(String value1, String value2) {
            addCriterion("d_name not between", value1, value2, "dName");
            return (Criteria) this;
        }

        public Criteria andDTypeIsNull() {
            addCriterion("d_type is null");
            return (Criteria) this;
        }

        public Criteria andDTypeIsNotNull() {
            addCriterion("d_type is not null");
            return (Criteria) this;
        }

        public Criteria andDTypeEqualTo(Integer value) {
            addCriterion("d_type =", value, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeNotEqualTo(Integer value) {
            addCriterion("d_type <>", value, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeGreaterThan(Integer value) {
            addCriterion("d_type >", value, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("d_type >=", value, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeLessThan(Integer value) {
            addCriterion("d_type <", value, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeLessThanOrEqualTo(Integer value) {
            addCriterion("d_type <=", value, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeIn(List<Integer> values) {
            addCriterion("d_type in", values, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeNotIn(List<Integer> values) {
            addCriterion("d_type not in", values, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeBetween(Integer value1, Integer value2) {
            addCriterion("d_type between", value1, value2, "dType");
            return (Criteria) this;
        }

        public Criteria andDTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("d_type not between", value1, value2, "dType");
            return (Criteria) this;
        }

        public Criteria andDPhoneIsNull() {
            addCriterion("d_phone is null");
            return (Criteria) this;
        }

        public Criteria andDPhoneIsNotNull() {
            addCriterion("d_phone is not null");
            return (Criteria) this;
        }

        public Criteria andDPhoneEqualTo(String value) {
            addCriterion("d_phone =", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneNotEqualTo(String value) {
            addCriterion("d_phone <>", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneGreaterThan(String value) {
            addCriterion("d_phone >", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneGreaterThanOrEqualTo(String value) {
            addCriterion("d_phone >=", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneLessThan(String value) {
            addCriterion("d_phone <", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneLessThanOrEqualTo(String value) {
            addCriterion("d_phone <=", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneLike(String value) {
            addCriterion("d_phone like", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneNotLike(String value) {
            addCriterion("d_phone not like", value, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneIn(List<String> values) {
            addCriterion("d_phone in", values, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneNotIn(List<String> values) {
            addCriterion("d_phone not in", values, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneBetween(String value1, String value2) {
            addCriterion("d_phone between", value1, value2, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDPhoneNotBetween(String value1, String value2) {
            addCriterion("d_phone not between", value1, value2, "dPhone");
            return (Criteria) this;
        }

        public Criteria andDEmailIsNull() {
            addCriterion("d_email is null");
            return (Criteria) this;
        }

        public Criteria andDEmailIsNotNull() {
            addCriterion("d_email is not null");
            return (Criteria) this;
        }

        public Criteria andDEmailEqualTo(String value) {
            addCriterion("d_email =", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailNotEqualTo(String value) {
            addCriterion("d_email <>", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailGreaterThan(String value) {
            addCriterion("d_email >", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailGreaterThanOrEqualTo(String value) {
            addCriterion("d_email >=", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailLessThan(String value) {
            addCriterion("d_email <", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailLessThanOrEqualTo(String value) {
            addCriterion("d_email <=", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailLike(String value) {
            addCriterion("d_email like", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailNotLike(String value) {
            addCriterion("d_email not like", value, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailIn(List<String> values) {
            addCriterion("d_email in", values, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailNotIn(List<String> values) {
            addCriterion("d_email not in", values, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailBetween(String value1, String value2) {
            addCriterion("d_email between", value1, value2, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDEmailNotBetween(String value1, String value2) {
            addCriterion("d_email not between", value1, value2, "dEmail");
            return (Criteria) this;
        }

        public Criteria andDDescribeIsNull() {
            addCriterion("d_describe is null");
            return (Criteria) this;
        }

        public Criteria andDDescribeIsNotNull() {
            addCriterion("d_describe is not null");
            return (Criteria) this;
        }

        public Criteria andDDescribeEqualTo(String value) {
            addCriterion("d_describe =", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeNotEqualTo(String value) {
            addCriterion("d_describe <>", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeGreaterThan(String value) {
            addCriterion("d_describe >", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeGreaterThanOrEqualTo(String value) {
            addCriterion("d_describe >=", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeLessThan(String value) {
            addCriterion("d_describe <", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeLessThanOrEqualTo(String value) {
            addCriterion("d_describe <=", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeLike(String value) {
            addCriterion("d_describe like", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeNotLike(String value) {
            addCriterion("d_describe not like", value, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeIn(List<String> values) {
            addCriterion("d_describe in", values, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeNotIn(List<String> values) {
            addCriterion("d_describe not in", values, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeBetween(String value1, String value2) {
            addCriterion("d_describe between", value1, value2, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDDescribeNotBetween(String value1, String value2) {
            addCriterion("d_describe not between", value1, value2, "dDescribe");
            return (Criteria) this;
        }

        public Criteria andDSuperioridIsNull() {
            addCriterion("d_superiorId is null");
            return (Criteria) this;
        }

        public Criteria andDSuperioridIsNotNull() {
            addCriterion("d_superiorId is not null");
            return (Criteria) this;
        }

        public Criteria andDSuperioridEqualTo(Integer value) {
            addCriterion("d_superiorId =", value, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridNotEqualTo(Integer value) {
            addCriterion("d_superiorId <>", value, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridGreaterThan(Integer value) {
            addCriterion("d_superiorId >", value, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridGreaterThanOrEqualTo(Integer value) {
            addCriterion("d_superiorId >=", value, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridLessThan(Integer value) {
            addCriterion("d_superiorId <", value, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridLessThanOrEqualTo(Integer value) {
            addCriterion("d_superiorId <=", value, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridIn(List<Integer> values) {
            addCriterion("d_superiorId in", values, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridNotIn(List<Integer> values) {
            addCriterion("d_superiorId not in", values, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridBetween(Integer value1, Integer value2) {
            addCriterion("d_superiorId between", value1, value2, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDSuperioridNotBetween(Integer value1, Integer value2) {
            addCriterion("d_superiorId not between", value1, value2, "dSuperiorid");
            return (Criteria) this;
        }

        public Criteria andDStartdateIsNull() {
            addCriterion("d_startDate is null");
            return (Criteria) this;
        }

        public Criteria andDStartdateIsNotNull() {
            addCriterion("d_startDate is not null");
            return (Criteria) this;
        }

        public Criteria andDStartdateEqualTo(Date value) {
            addCriterionForJDBCDate("d_startDate =", value, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("d_startDate <>", value, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateGreaterThan(Date value) {
            addCriterionForJDBCDate("d_startDate >", value, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("d_startDate >=", value, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateLessThan(Date value) {
            addCriterionForJDBCDate("d_startDate <", value, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("d_startDate <=", value, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateIn(List<Date> values) {
            addCriterionForJDBCDate("d_startDate in", values, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("d_startDate not in", values, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("d_startDate between", value1, value2, "dStartdate");
            return (Criteria) this;
        }

        public Criteria andDStartdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("d_startDate not between", value1, value2, "dStartdate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}